package vn.com.fsoft.model.entities;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.*;

@Entity
@Table(name = "CONTACT")
public class Contact implements java.io.Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = -7382235130230360562L;
	private int contactId;	
	private int managerId;	
	private String firstName;	
	private String surName;	
	private String mobilePhone;	
	private String email;	
	private String contactType;	
	private String knownAs;	
	private String officePhone;	
	private String stHomePhone;	
	private String workbase;	
	private String jobTitle;	
	private String jobRole;	
	private int isActive;
	private Set<Programme> programme = new HashSet<Programme>(0);
	
	public Contact() {
		super();
	}
	public Contact(int contactId, int managerId, String firstName,
			String surName, String mobilePhone, String email,
			String contactType, String knownAs, String officePhone,
			String stHomePhone, String workbase, String jobTitle,
			String jobRole, int isActive) {
		super();
		this.contactId = contactId;
		this.managerId = managerId;
		this.firstName = firstName;
		this.surName = surName;
		this.mobilePhone = mobilePhone;
		this.email = email;
		this.contactType = contactType;
		this.knownAs = knownAs;
		this.officePhone = officePhone;
		this.stHomePhone = stHomePhone;
		this.workbase = workbase;
		this.jobTitle = jobTitle;
		this.jobRole = jobRole;
		this.isActive = isActive;
	}

	
		

	/* * Getter and Setter* */
	@Id
	@GeneratedValue	
	@Column(name = "CONTACT_ID", unique = true, nullable = false)
	public int getContactId() {
		return contactId;
	}

	public void setContactId(int contactId) {
		this.contactId = contactId;
	}
	@Column(name = "MOBILE_PHONE")
	public String getMobilePhone() {
		return mobilePhone;
	}

	public void setMobilePhone(String mobilePhone) {
		this.mobilePhone = mobilePhone;
	}
	@Column(name = "EMAIL")
	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}
	@Column(name = "CONTACT_TYPE")
	public String getContactType() {
		return contactType;
	}

	public void setContactType(String contactType) {
		this.contactType = contactType;
	}
	@Column(name = "IS_ACTIVE")
	public int getIsActive() {
		return isActive;
	}

	public void setIsActive(int isActive) {
		this.isActive = isActive;
	}
	@Column(name = "MANAGER_ID")
	public int getManagerId() {
		return managerId;
	}

	public void setManagerId(int managerId) {
		this.managerId = managerId;
	}
	@Column(name = "FIRST_NAME")
	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}
	@Column(name = "SURNAME")
	public String getSurName() {
		return surName;
	}

	public void setSurName(String surName) {
		this.surName = surName;
	}
	@Column(name = "KNOWN_AS")
	public String getKnownAs() {
		return knownAs;
	}
	public void setKnownAs(String knownAs) {
		this.knownAs = knownAs;
	}
	@Column(name = "OFFICE_PHONE")
	public String getOfficePhone() {
		return officePhone;
	}
	public void setOfficePhone(String officePhone) {
		this.officePhone = officePhone;
	}
	@Column(name = "STHOME_PHONE")
	public String getStHomePhone() {
		return stHomePhone;
	}

	public void setStHomePhone(String stHomePhone) {
		this.stHomePhone = stHomePhone;
	}
	@Column(name = "WORKBASE")
	public String getWorkbase() {
		return workbase;
	}

	public void setWorkbase(String workbase) {
		this.workbase = workbase;
	}
	@Column(name = "JOB_TITLE")
	public String getJobTitle() {
		return jobTitle;
	}

	public void setJobTitle(String jobTitle) {
		this.jobTitle = jobTitle;
	}
	@Column(name = "JOB_ROLE")
	public String getJobRole() {
		return jobRole;
	}

	public void setJobRole(String jobRole) {
		this.jobRole = jobRole;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "contactProgramme")
	public Set<Programme> getProgramme() {
		return programme;
	}

	public void setProgramme(Set<Programme> programme) {
		this.programme = programme;
	}
	

}
